package com.gzh.teaching.model.vo;

import com.gzh.core.model.vo.BasePageParam;
import com.gzh.core.util.NumericHelper;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * @Author guanzh
 * @Date 2022/1/27 15:55
 * @Description
 */
@Getter
@Setter
@ToString
public class QueryUserParam extends BasePageParam {

    private String grade;
    private String academyId;
    private String classId;
    private String courseId;
    private String roleId;
    private String stuId;

    public QueryUserIn paramToIn(Integer userId) {
        QueryUserIn in = new QueryUserIn();
        in.setGrade(NumericHelper.toInteger(this.grade));
        in.setAcademyId(NumericHelper.toInteger(this.academyId));
        in.setClassId(NumericHelper.toInteger(this.classId));
        in.setCourseId(NumericHelper.toInteger(this.courseId));
        in.setRoleId(NumericHelper.toInteger(this.roleId));
        in.setUserId(userId);
        in.setStuId(this.stuId);
        in.setPageNum(this.getPageNum());
        in.setPageSize(this.getPageSize());
        return in;
    }
}
